package com.yeyaomai.dksns.flowis.domain;

import java.util.Date;
/**
 * 浏览器
 * @author xiaqin
 *
 */
public class Browser extends Entity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Long id;

	private Date referDate;

	private String browserName;

	private Integer visitCount;

	private Integer uniqueHost;

	private Integer ip;

	private Integer newUniqueHost;

	private Long avgStopTime;

	private String avgCount;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getReferDate() {
		return referDate;
	}

	public void setReferDate(Date referDate) {
		this.referDate = referDate;
	}

	public String getBrowserName() {
		return browserName;
	}

	public void setBrowserName(String browserName) {
		this.browserName = browserName;
	}

	public Integer getVisitCount() {
		return visitCount;
	}

	public void setVisitCount(Integer visitCount) {
		this.visitCount = visitCount;
	}

	public Integer getUniqueHost() {
		return uniqueHost;
	}

	public void setUniqueHost(Integer uniqueHost) {
		this.uniqueHost = uniqueHost;
	}

	public Integer getIp() {
		return ip;
	}

	public void setIp(Integer ip) {
		this.ip = ip;
	}

	public Integer getNewUniqueHost() {
		return newUniqueHost;
	}

	public void setNewUniqueHost(Integer newUniqueHost) {
		this.newUniqueHost = newUniqueHost;
	}

	public Long getAvgStopTime() {
		return avgStopTime;
	}

	public void setAvgStopTime(Long avgStopTime) {
		this.avgStopTime = avgStopTime;
	}

	public String getAvgCount() {
		avgCount = this.getUniqueHost() == 0 ? "0.00" : String.format("%.2f",
				(double) this.getVisitCount() / this.getUniqueHost());
		return avgCount;
	}

	public void setAvgCount(String avgCount) {
		this.avgCount = avgCount;
	}

}
